package com.caishi.lkx.user.api;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

import com.caishi.lkx.common.AdminBaseApi;
import com.caishi.lkx.user.model.SysGroupRenewalLogModel;
import com.caishi.lkx.user.service.IGroupRenewalLogService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@Tag(name = "机构使用记录")
@RestController
@RequestMapping("/user/sys/group/log")
public class GroupRenewalLogApi extends AdminBaseApi<IGroupRenewalLogService, SysGroupRenewalLogModel, Long> {
    @Resource
    private IGroupRenewalLogService groupRenewalLogService;

    @Override
    public IGroupRenewalLogService loadService() {
        return groupRenewalLogService;
    }

    protected LambdaQueryWrapper<SysGroupRenewalLogModel> baseWrapper(SysGroupRenewalLogModel model, JSONObject otherParam) {
        if (null == model.getType()) {
            model.setType(1);
        }
        return super.baseWrapper(model, otherParam);
    }


}
